// 获取菜单中路由和标题的信息
const menuKeyAndLaber = (lists) => {
  const list = JSON.parse(JSON.stringify(lists))
  let newObj = {}
  const degui = (list) => {
      list.forEach(item => {
          for (const key in item) {
              if (key === "key") {
                  newObj[item.key] = item.label
              }
              if (key === 'children') {
                  //子菜单需要递归
                  degui(item[key])
              }
          }
      });
  }
  degui(list)
  return newObj
}
export default menuKeyAndLaber
